package cc.lj.internal.coupons.interfaces.dto.convert;

import cc.lj.internal.coupons.domain.martcap.model.vo.MartCapDO;
import cc.lj.internal.coupons.interfaces.dto.MartCapDTO;
import cc.lj.internal.coupons.interfaces.dto.command.MartCapAddCommand;
import cc.lj.internal.coupons.interfaces.dto.command.MartCapUpdateCommand;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import javax.validation.Valid;

@Mapper
public interface MartCapDTOConvertDO {

       MartCapDTOConvertDO INSTANCE = Mappers.getMapper(MartCapDTOConvertDO.class);
       //command dto to do
       MartCapDO convert(MartCapAddCommand martCapAddCommand);
       //do to dto
       @Mapping(source = "isStart",target = "isStart")
       @Mapping(source = "isOver",target = "isOver")
       MartCapDTO convert(MartCapDO martCapDO);
       //update commamd to do
       MartCapDO convert(MartCapUpdateCommand martCapUpdateCommand);
       //dto to do
       MartCapDO convert(MartCapDTO martCapDTO);
}
